import axios from '@/api/fetch';
import SERVER from '@/api/server';

export const queryToolsInfo = params => axios.get(`${SERVER.DMSCLOUD_PART}/tools/toolsInfo`, { params });

export const queryToolsBorrowAndReturn = params => axios.get(`${SERVER.DMSCLOUD_PART}/tools/queryToolsBorrowAndReturn`, { params });

export const saveBorrowOrder = params => axios.post(`${SERVER.DMSCLOUD_PART}/tools/saveBorrowOrder`, params);

export const saveReturnOrder = params => axios.post(`${SERVER.DMSCLOUD_PART}/tools/saveReturnOrder`, params);

export const deleteBorrowOrder = params => axios.post(`${SERVER.DMSCLOUD_PART}/tools/deleteBorrowOrder`, params);

export const getBorrowOrderInfo = params => axios.get(`${SERVER.DMSCLOUD_PART}/tools/getBorrowOrderInfo`, { params });

export const getBorrowOrderItems = params => axios.get(`${SERVER.DMSCLOUD_PART}/tools/getBorrowOrderItems`, { params });

export const accountBorrowOrder = params => axios.post(`${SERVER.DMSCLOUD_PART}/tools/accountBorrowOrder`, params);

export const findBorrwoOrderForReturn = params => axios.get(`${SERVER.DMSCLOUD_PART}/tools/findBorrwoOrderForReturn`, { params });

export const getBorrowOrderItemsForReturn = params => axios.get(`${SERVER.DMSCLOUD_PART}/tools/getBorrowOrderItemsForReturn`, { params });

export const getReturnOrderInfo = params => axios.get(`${SERVER.DMSCLOUD_PART}/tools/getReturnOrderInfo`, { params });

export const getReturnOrderItems = params => axios.get(`${SERVER.DMSCLOUD_PART}/tools/getReturnOrderItems`, { params });

export const accountReturnOrder = params => axios.post(`${SERVER.DMSCLOUD_PART}/tools/accountReturnOrder`, params);

export const saveBreakOrder = params => axios.post(`${SERVER.DMSCLOUD_PART}/tools/saveBreakOrder`, params);

export const findBorrwoOrderForLoss = params => axios.get(`${SERVER.DMSCLOUD_PART}/tools/findBorrwoOrderForLoss`, { params });

export const getBorrowOrderItemsForLoss = params => axios.get(`${SERVER.DMSCLOUD_PART}/tools/getBorrowOrderItemsForLoss`, { params });

export const queryToolsLoss = params => axios.get(`${SERVER.DMSCLOUD_PART}/tools/queryToolsLoss`, { params });

export const deleteLossOrder = params => axios.post(`${SERVER.DMSCLOUD_PART}/tools/deleteLossOrder`, params);

export const getLossOrderItems = params => axios.get(`${SERVER.DMSCLOUD_PART}/tools/getLossOrderItems`, { params });

export const accountLossOrder = params => axios.post(`${SERVER.DMSCLOUD_PART}/tools/accountLossOrder`, params);
